Platform Explorer / Nuxeo Platform 2021.7

Extension point renditionDefinitions

Documentation

Extension point to register rendition definitions. For instance, here is one defining a PDF rendition.

    <renditionDefinition enabled="true" name="pdf">
        <label>label.rendition.pdf</label>
        <operationChain>blobToPDF</operationChain>
    </renditionDefinition>

Since 6.0:

  • a new allowEmptyBlob tag has been added. Setting it's value to true will allow the rendition to be available even if the target Document does not contains a Blob.
  • a new visible attribute has been added. Setting it's value to false will allow the rendition to be hidden from the UI services.

Contribution Descriptors

  • Class: org.nuxeo.ecm.platform.rendition.service.RenditionDefinition

Existing Contributions

Contributions are presented in the same order as the registration order on this extension point. This order is displayed before the contribution name, in brackets.

  • nuxeo-platform-rendition-core-2021.7.15.jar /OSGI-INF/rendition-contrib.xml
    <extension point="renditionDefinitions" target="org.nuxeo.ecm.platform.rendition.service.RenditionService">
        <renditionDefinition name="pdf">
          <label>label.rendition.pdf</label>
          <icon>/icons/pdf.png</icon>
          <contentType>application/pdf</contentType>
          <operationChain>blobToPDF</operationChain>
          <filters>
            <filter-id>allowPDFRendition</filter-id>
          </filters>
        </renditionDefinition>
    
        <renditionDefinition name="xmlExport">
          <label>label.exportview.xmlExport</label>
          <icon>/icons/xml.png</icon>
          <contentType>text/xml</contentType>
          <allowEmptyBlob>true</allowEmptyBlob>
          <operationChain>xmlExportRendition</operationChain>
        </renditionDefinition>
    
        <renditionDefinition name="zipExport">
          <label>label.exportview.zipExport</label>
          <icon>/icons/zip_export.png</icon>
          <contentType>application/zip</contentType>
          <allowEmptyBlob>true</allowEmptyBlob>
          <operationChain>zipTreeExportRendition</operationChain>
          <filters>
            <filter-id>not_folder</filter-id>
          </filters>
        </renditionDefinition>
    
        <renditionDefinition name="zipTreeExport">
          <label>label.exportview.zipTreeExport</label>
          <icon>/icons/zip_tree_export.png</icon>
          <contentType>application/zip</contentType>
          <allowEmptyBlob>true</allowEmptyBlob>
          <operationChain>zipTreeExportRendition</operationChain>
          <variantPolicy>user</variantPolicy>
          <filters>
            <filter-id>folder</filter-id>
          </filters>
        </renditionDefinition>
    
        <renditionDefinition name="mainBlob" visible="false">
          <operationChain>mainBlob</operationChain>
          <allowEmptyBlob>true</allowEmptyBlob>
          <contentType/>
        </renditionDefinition>
    
        <renditionDefinition name="containerDefaultRendition" visible="false">
          <contentType>application/zip</contentType>
          <operationChain>containerContentBlob</operationChain>
          <allowEmptyBlob>true</allowEmptyBlob>
          <filters>
            <filter-id>container</filter-id>
          </filters>
        </renditionDefinition>
    
      </extension>
  • nuxeo-platform-imaging-core-2021.7.15.jar /OSGI-INF/picture-renditions-contrib.xml
    <extension point="renditionDefinitions" target="org.nuxeo.ecm.platform.rendition.service.RenditionService">
    
        <renditionDefinition name="imageToPDF">
          <label>label.rendition.pdf</label>
          <icon>/icons/pdf.png</icon>
          <contentType>application/pdf</contentType>
          <operationChain>Image.Blob.ConvertToPDF</operationChain>
          <filters>
            <filter-id>hasPictureFacet</filter-id>
          </filters>
        </renditionDefinition>
    
      </extension>
  • nuxeo-template-rendering-core-2021.7.15.jar /OSGI-INF/rendition-contrib.xml
    <extension point="renditionDefinitions" target="org.nuxeo.ecm.platform.rendition.service.RenditionService">
        <renditionDefinition class="org.nuxeo.template.rendition.TemplateBasedRenditionProvider" enabled="true" name="delivery">
          <icon>/icons/delivery.png</icon>
          <label>label.rendition.delivery</label>
        </renditionDefinition>
        <renditionDefinition class="org.nuxeo.template.rendition.TemplateBasedRenditionProvider" enabled="true" name="webView">
          <icon>/icons/htmlView.png</icon>
          <label>label.rendition.webView</label>
        </renditionDefinition>
      </extension>
  • nuxeo-thumbnail-2021.7.15.jar /OSGI-INF/thumbnail-rendition-contrib.xml
    <extension point="renditionDefinitions" target="org.nuxeo.ecm.platform.rendition.service.RenditionService">
    
        <renditionDefinition class="org.nuxeo.ecm.platform.thumbnail.rendition.ThumbnailRenditionProvider" cmisName="nuxeo:icon" name="thumbnail">
          <label>label.rendition.thumbnail</label>
          <icon>/icons/image.gif</icon>
          <kind>cmis:thumbnail</kind>
          <contentType>image/jpeg</contentType>
        </renditionDefinition>
    
      </extension>